<?php

class IndexController extends Api_Controller_User_Abstract
{

    public function init()
    {
        parent::init();
    }
       
    public function indexAction()
    {
        
    }
    
    /*
     * Test Action controller
     */
    public function testactionAction()
    {
        echo $this->_helper->multiples->twice(3);
        echo $this->_helper->test->power(3,3);
    }
    
    /*
     * Test uncaught exceptions
     */
    public function testlogdefaultAction()
    {
        throw new Zend_Exception("New Exp!");
    }
    
    /*
     * Test caught exceptions
     */
    public function testlogAction()
    {
       try {
           throw new Zend_Exception("Testing Logger Configuration");
       } catch (Zend_Exception $e) {
           Api_Util_Log_Logger::crit($e->getMessage());
       }
    }
    
    public function testemailAction()
    {
        try {
            $mail = new Zend_Mail();
            $mail->setBodyText('Test Body');
            $mail->setFrom('no-reply@smshub.bd', 'SmsHub');
            $mail->addTo('anindya23@gmail.com', 'Anindya Roy Chowdhury');
            $mail->setSubject('Test Subject');
            $mail->send();
        } catch (Exception $e) {
            Api_Util_Log_Logger::crit($e->getMessage());
        }
    }

}

